import request from '@/utils/request'

// 查询采购邮寄列表
export function listPost(query) {
  return request({
    url: '/buy0003/post/list',
    method: 'get',
    params: query
  })
}

// 查询采购邮寄详细
export function getPost(id) {
  return request({
    url: '/buy0003/post/' + id,
    method: 'get'
  })
}

// 新增采购邮寄
export function addPost(data) {
  return request({
    url: '/buy0003/post',
    method: 'post',
    data: data
  })
}

// 修改采购邮寄
export function updatePost(data) {
  return request({
    url: '/buy0003/post',
    method: 'put',
    data: data
  })
}

// 删除采购邮寄
export function delPost(id) {
  return request({
    url: '/buy0003/post/' + id,
    method: 'delete'
  })
}

// 新增采购邮寄带明细
export function addPostWithDetail(data) {
  return request({
    url: '/buy0003/post/addPostWithDetail',
    method: 'post',
    data: data
  })
}

// 新增采购邮寄带明细
export function addInvWithDetail(data) {
  return request({
    url: '/buy0003/post/addInvWithDetail',
    method: 'post',
    data: data
  })
}
